package com.huqiwen.dom4j;

import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;

public class Dom4jTest {
	public static void main(String[] args) {
		String text = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <object name=\"售电情况\" unit=\"Mwh\"><property><propertyName>售电量</propertyName> 		<propertyType>number</propertyType> 		<value>20000</value> 	</property> 	<property> 		<propertyName>大工业用电</propertyName> 		<propertyType>number</propertyType> 		<value>10000</value> 	</property> 	<property> 		<propertyName>趸售电量</propertyName> 		<propertyType>number</propertyType> <value>5000</value> 	</property><property> <propertyName>其他</propertyName> <propertyType>number</propertyType> <value>5000</value> </property> </object>";
		try {
			Document document = DocumentHelper.parseText(text);
			String test = document.getStringValue();
			System.out.println(test);
		} catch (DocumentException e) {			
			e.printStackTrace();
		}
	}
}
